package cn.iocoder.yudao.module.wms.dal.mysql.employee;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.wms.dal.dataobject.employee.EmployeeDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.wms.controller.admin.employee.vo.*;

/**
 * 员工 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface EmployeeMapper extends BaseMapperX<EmployeeDO> {

    default PageResult<EmployeeDO> selectPage(EmployeePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<EmployeeDO>()
                // .eqIfPresent(EmployeeDO::getAddress, reqVO.getAddress())
                // .eqIfPresent(EmployeeDO::getCreateAt, reqVO.getCreateAt())
                // .eqIfPresent(EmployeeDO::getDepartment, reqVO.getDepartment())
                // .eqIfPresent(EmployeeDO::getGender, reqVO.getGender())
                // .eqIfPresent(EmployeeDO::getIdCard, reqVO.getIdCard())
                // .likeIfPresent(EmployeeDO::getName, reqVO.getName())
                // .eqIfPresent(EmployeeDO::getPhone, reqVO.getPhone())
                // .eqIfPresent(EmployeeDO::getUpdateAt, reqVO.getUpdateAt())
                .orderByDesc(EmployeeDO::getUpdateAt));
    }

}